# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=libqmi
pkgver=1.30.6
pkgrel=0
pkgdesc="QMI modem protocol helper library"
url="https://www.freedesktop.org/wiki/Software/libqmi"
arch="all"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
makedepends="glib-dev gtk-doc libgudev-dev libmbim-dev libqrtr-glib-dev
	linux-headers python3"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-bash-completion
	${pkgname#lib}-utils
	"
source="https://www.freedesktop.org/software/libqmi/libqmi-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-static \
		--enable-mbim-qmux \
		--enable-qrtr \
		--enable-gtk-doc
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

utils() {
	pkgdesc="$pkgdesc (CLI utilities)"

	amove 'usr/bin'
}

sha512sums="
6dc9819bb45063ea827b989e99e8e889db0ce6ebec62586003ea385bd54bd76f3e79d63e3f2b57e19da5f42ed87d7aa11aa024a805ec86a6b203981eb7922a76  libqmi-1.30.6.tar.xz
"
